Actor SwordSelected : Inventory
{
	Inventory.Maxamount 1
}

ACTOR Rage : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 200
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 200
   Inventory.Icon "RAGEA0"
}

ACTOR Zeal : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 200
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 200
   Inventory.Icon "ZEALA0"
}

Actor Rage_transformation : inventory
{
inventory.maxamount 10
Inventory.Icon "FRPCA0"
}

Actor FirstSequenceDone : inventory
{
inventory.maxamount 1
}


// Inheriting from FighterWeapon is a horrible idea
ACTOR TheQuietus : BrutalWeapon Replaces FWeapQuietus
{
	Game Doom
	Health 3
	Weapon.SelectionOrder 2900
	+WEAPON.PRIMARY_USES_BOTH
	+WEAPON.NOAUTOAIM
	+WEAPON.NOALERT
	+WEAPON.NOAUTOFIRE
	+WEAPON.CHEATNOTWEAPON
	+Inventory.NoAttenPickupSound
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive1 0
	Weapon.AmmoGive2 0
	Weapon.KickBack 150
	Weapon.AmmoType1 "Zeal"
	Weapon.AmmoType2 "Rage"
	Inventory.PickupMessage "Picked up the Quietus! (Slot 1)"
	Inventory.ForbiddenTo BDoomer, Sorcerer, TacticalDoomer
	Inventory.PickupSound "WeaponBuild"
	Tag "$TAG_FWEAPQUIETUS"


	States
	{
	Spawn:
		TNT1 A -1
		Stop
		
	Select:
		TNT1 A 0 A_Giveinventory("SwordSelected",1)
		
		W04G AAAAAAAAAA 1 A_Raise
		Goto BrutalWeapon::Select
		
	Deselect:
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		"####" A 0 A_TakeInventory("SwordSelected",1)
		"####" A 0 A_SetCrosshair(0)
        "####" A 0 A_ZoomFactor(1.0)
		W04G AAAAAAAAAA 1 A_Lower
		Goto BrutalWeapon::Deselect
		
	Ready:
	ReadyLoop:
		TNT1 A 0 A_TakeInventory("InHold2", 1)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown2", 1)
		TNT1 A 0 A_TakeInventory("FirstSequenceDone", 1)

        TNT1 A 0 A_TakeInventory("rage",1)
        TNT1 A 0 A_JumpIfInventory("rage",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_GiveInventory("zeal",1)
		
		W04G AB 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")

		TNT1 A 0 A_TakeInventory("rage",1)        	
			
		W04G C 5 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")

        TNT1 A 0 A_TakeInventory("rage",1)
        TNT1 A 0 A_JumpIfInventory("rage",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_GiveInventory("zeal",1)
	
		W04G C 5 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")

		W04G BA 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")

        TNT1 A 0 A_TakeInventory("rage",1)
        TNT1 A 0 A_JumpIfInventory("rage",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_GiveInventory("zeal",1)
		
		W04G A 5 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		
		TNT1 A 0 A_JumpIfInventory("rage",0,2)
		TNT1 A 0 A_TakeInventory("rage",1)
		W04G A 5 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("Kicking", 1, "DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		Loop
	
	Fire:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("InHold2", 1, "QuickSlash")
		TNT1 A 0 A_JumpIfInventory("SpecialAttackSword", 1, "SpecialAttack")
		TNT1 A 0 A_JumpIfInventory("ReadyToQuickFire", 1, "QuickFire")
		W04N ABC 2 A_SetAngle((-2)+angle)
	
	Hold:
	    TNT1 A 0
		W04N C 1 A_JumpIfInventory("Kicking",1,"KickLeft")
		W04N C 1 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		W04N C 1 A_Refire
		

	QuickFire:
	    TNT1 A 0
		TNT1 A 0 A_Giveinventory("Punching",1)
		TNT1 A 0 A_JumpIfInventory("ReadyToLunge", 1, "SpecialAttack")
		//TNT1 A 0 A_JumpIf (momZ > 0, "SlashDown")
		//TNT1 A 0 A_JumpIf (momZ < 0, "SlashDown")
		TNT1 A 0 A_TakeInventory("InHold2", 1)
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_JumpIfInventory("FirstSequenceDone", 1, "QuickFire2")

		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W14F DDE 1								//Idle state to slowdown if no rage
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-8)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -30, 0, 0, 18)
		//TNT1 A 0 A_FireCustomMissile("SawSwing", -45, 0, 0, 13)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		W14F E 1 A_SetAngle((0.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -20, 0, 0, 15)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		W14F F 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -10, 0, 0, 12)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		W14F G 1 A_SetAngle((1) + angle) 
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 0, 0, 0, 7) 
		TNT1 A 0 A_SetAngle((1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1.5)+angle)
		W14F H 1 A_SetAngle((1.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 10, 0, 0, 3)
		TNT1 A 0 A_SetAngle((1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		W14F I 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 20, 0, 0, 0)
		TNT1 A 0 A_SetAngle((1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		W14F J 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 30, 0, 0, -3)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_SetPitch((1.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 40, 0, 0, -7)
		TNT1 A 0 A_SetAngle((1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((1)+angle)
		//W04C L 1 A_SetAngle((0.5) + angle)
		//PUNG F 0 A_Custompunch(random(90,110),1,1,"BrutalAxePuff", 150)
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		
		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than there is next strike could be perfomed earlier
		W14F J 2								//Idle state to slowdown if no rage
			
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W14F K 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W14F K 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04D ABCDEF 2 A_WeaponReady // ("Kicking",1,"KickRight")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		
		Goto Ready

	QuickFire2:
	    TNT1 A 0
		TNT1 A 0 A_Giveinventory("Punching",1)
		TNT1 A 0 A_JumpIfInventory("ReadyToLunge", 1, "SpecialAttack")
		//TNT1 A 0 A_JumpIf (momZ > 0, "SlashDown")
		//TNT1 A 0 A_JumpIf (momZ < 0, "SlashDown")
		TNT1 A 0 A_TakeInventory("InHold2", 1)
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)
		TNT1 A 0 A_PlaySound("SWSWING")

//		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04F DDE 1								//Idle state to slowdown if no rage

		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-8)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -45, 0, 0, 12)
		//TNT1 A 0 A_FireCustomMissile("SawSwing", -45, 0, 0, 13)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		W04F E 1 A_SetAngle((0.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -30, 0, 0, 11)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		W04F F 1 A_SetAngle((1.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -15, 0, 0, 10)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		W04F G 1 A_SetAngle((1.5) + angle) 
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 0, 0, 0, 9) 
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		W04F H 1 A_SetAngle((1.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 15, 0, 0, 8)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		W04F I 1 A_SetAngle((1.5) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 30, 0, 0, 7)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		W04F J 1 A_SetAngle((2) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 45, 0, 0, 6)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((1.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 60, 0, 0, 5)
		TNT1 A 0 A_SetAngle((3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((3)+angle)
		//W04C L 1 A_SetAngle((0.5) + angle)
		//PUNG F 0 A_Custompunch(random(90,110),1,1,"BrutalAxePuff", 150)
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		
		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than there is next strike could be perfomed earlier
		W04F J 1								//Idle state to slowdown if no rage
		TNT1 A 0 A_SetAngle((6)+angle)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04F K 2 A_WeaponReady
		TNT1 A 0 A_SetAngle((4)+angle)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04F L 2 A_WeaponReady
		TNT1 A 0 A_SetAngle((2)+angle)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04D ABCDEF 2 A_WeaponReady // ("Kicking",1,"KickRight")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		
		Goto Ready
		
			
	SpecialAttack:
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "RoundhouseSlash")
	    TNT1 A 5
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_JumpIfInventory("FirstSequenceDone", 1, "SpecialAttack2")
		
		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04C A 1								//Idle state to slowdown if no rage
		
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-8)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W04C B 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 30, 0, 0, 18)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W24C C 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 20, 0, 0, 15)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W24C D 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 10, 0, 0, 12)
		TNT1 A 0 A_SetAngle((-1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1.5)+angle)
		W24C E 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 0, 0, 0, 10)
		TNT1 A 0 A_SetAngle((-1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W24C F 1 A_SetPitch((-3) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -10, 0, 0, 7)
		TNT1 A 0 A_SetAngle((-1.5)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W24C G 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -20, 0, 0, 3)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		W24C H 1 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -30, 0, 0, 0)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-1)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -35, 0, 0, -3)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		
		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W24C IJ 1								//Idle state to slowdown if no rage
		TNT1 A 0 A_GiveInventory("FirstSequenceDone", 1)
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		
		//TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//TNT1 A 6 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		W24C K 2 A_WeaponReady //("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W24C L 2 A_WeaponReady
		W24C L 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		//TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)

		Goto Ready	

	SpecialAttack2:
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "RoundhouseSlash")
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("SWSWING")

		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04C A 1								//Idle state to slowdown if no rage
		
		TNT1 A 0 A_TakeInventory("FirstSequenceDone", 1)
		
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-8)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C B 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 45, 0, 0, 8)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C C 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 30, 0, 0, 6)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C D 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 15, 0, 0, 4)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C E 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", 0, 0, 0, 2)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C F 1 A_SetPitch((-3) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -15, 0, 0, 0)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C G 1 A_SetPitch((-3) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -30, 0, 0, -2)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04C H 1 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -40, 0, 0, -4)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_SetAngle((-3)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwing2", -50, 0, 0, -6)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		
//		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
//		W04C F 2								//Idle state to slowdown if no rage
		W04C I 1 A_WeaponReady
		TNT1 A 0 A_SetAngle((-6)+angle)
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		//TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//TNT1 A 6 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		W04C J 1 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_SetAngle((-4)+angle)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W04D K 2 A_WeaponReady
		TNT1 A 0 A_SetAngle((-3)+angle)
		W04D L 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		//TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)

		Goto Ready		
	
	AltFire:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("ReadyToQuickFire", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("ReadyToSlashDown2", 1, "SlashDownLeft")
		TNT1 A 0 A_JumpIfInventory("SpecialAttackSword", 1, "QuickLunge")
		TNT1 A 0 A_JumpIfInventory("InHold2", 1, "QuickLunge")
		TNT1 A 0 A_JumpIfInventory("ReadyToLunge", 1, "QuickLunge")
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "Lunge")
		//TNT1 A 0 A_JumpIfInventory("ReadyToSlashDown", 1, "SlashDown")
		//NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		//NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		W04B A 1 A_SetPitch((-2.5) + pitch)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "Lunge")
		W04B B 1 A_SetPitch((-2.5) + pitch)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "Lunge")
		W04B C 1 A_SetPitch((-2.0) + pitch)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "Lunge")
		W04B D 1 A_SetPitch((-2.0) + pitch)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "Lunge")
		W04B D 1 A_SetPitch((-1.5) + pitch)
		W04B E 1 A_SetPitch((-1.5) + pitch)
		
		//W04R A 3

	
	AltHold:
		TNT1 A 0 
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold2")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "RoundhouseSlash")
		//TNT1 A 0 A_ChangeVelocity(cos(pitch)-1,0,-sin(pitch)+2.2,CVF_RELATIVE)
		W04B F 1 
		TNT1 A 0 A_Refire
		
	SlashDown:
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)

		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04J A 2								//Idle state to slowdown if no rage

		TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_PlaySound("SWSWING")
		W04J AC 1 A_SetPitch((-4) + pitch)
		W04J D 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_Recoil(-10)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -10, 0, 0, 15)
		//TNT1 A 0 A_FireCustomMissile("SawSwing", -45, 0, 0, 13)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J E 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -5, 0, 0, 7)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J F 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -2, 0, 0, 0)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J G 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 0, 0, 0, 3)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J H 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 2, 0, 0, -8)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J I 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 5, 0, 0, -14)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J J 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 10, 0, 0, -20)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04J K 1 A_SetAngle((1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 15, 0, 0, -25)
		TNT1 A 0 A_SetPitch((1.5) + pitch)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown2", 1)
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		W04J K 1 A_WeaponReady
		TNT1 A 0 A_SetPitch((1) + pitch)
		W04J K 1 A_WeaponReady

		//TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04J OOOO 1	A_SetPitch((-1.2) + pitch)							//Idle state to slowdown if no rage
//		TNT1 A 0 A_SetPitch((-1.2) + pitch)		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04J O 1 A_WeaponReady
		TNT1 A 0 A_SetPitch((-1.2) + pitch)
		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04D A 1 A_WeaponReady // ("Kicking",1,"KickRight")
		W04D B 1 A_WeaponReady // ("Kicking",1,"KickRight")
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04D C 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1.5) + pitch)
		W04D D 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1.5) + pitch)
		W04D E 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-2) + pitch)		
		W04D F 2 A_WeaponReady // ("Kicking",1,"KickRight")
		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown2", 1)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		
		Goto Ready
		//Goto GotoHold1
		
	SlashDownLeft:
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown2", 1)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "QuickLunge")
		
		TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04J A 3								//Idle state to slowdown if no rage
		
		TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_PlaySound("SWSWING")
		W04K ABCD 1 A_SetPitch((-4) + pitch)
		W04K E 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_Recoil(-10)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 10, 0, 0, 15)
		//TNT1 A 0 A_FireCustomMissile("SawSwing", -45, 0, 0, 13)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K F 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 5, 0, 0, 7)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K G 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 2, 0, 0, 0)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K H 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", 0, 0, 0, 3)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K I 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -2, 0, 0, -8)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K K 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -5, 0, 0, -14)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K K 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -10, 0, 0, -20)
		TNT1 A 0 A_SetPitch((3) + pitch)
		W04K L 1 A_SetAngle((-1) + angle)
		TNT1 A 0 A_WeaponReady
		TNT1 A 0 A_FireCustomMissile("SwordSlash", -15, 0, 0, -25)
		TNT1 A 0 A_SetPitch((1) + pitch)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)

	
		//TNT1 A 0 A_JumpIfInventory("rage",50, 2) //if rage is more than 50 than strike start faster
		W04J LLLL 1	A_SetPitch((-1.2) + pitch)								//Idle state to slowdown if no rage
				
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04K L 1 A_WeaponReady
		TNT1 A 0 A_SetPitch((-1.2) + pitch)
		//TNT1 A 0 A_SetPitch((1) + pitch)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04K L 2 A_WeaponReady
		//TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04D A 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1) + pitch)
		W04D B 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1) + pitch)
		W04D C 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1.5) + pitch)
		W04D D 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-1.5) + pitch)
		W04D E 2 A_WeaponReady // ("Kicking",1,"KickRight")
		//TNT1 A 0 A_SetPitch((-2) + pitch)		
		W04D F 2 A_WeaponReady // ("Kicking",1,"KickRight")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		
		Goto Ready
//		Goto GotoHold1
	
	//Reload:
	//TNT1 A 0
	//Goto GotoHold2
	
	GotoHold2:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_GiveInventory("InHold2",1)
		W04H ABCDE 2
		W04H FGHIJ 1 A_WeaponReady
		W04H J 2 A_WeaponReady
		Goto Hold2
		
	GotoHold1:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_TakeInventory("InHold2",1)
		W04H JIHGF 2
		W04H EDCBA 1 A_WeaponReady
		W04H A 2 A_WeaponReady
		Goto Ready
		
	Hold2:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"GotoHold1")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		W04Q A 1 A_WeaponReady
		loop
	
	QuickSlash:
		TNT1 A 0
	    TNT1 A 0 A_TakeInventory("InHold2",1)
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "RoundhouseSlash")
		W04Q BC 1 A_SetPitch((-2) + pitch) 
		W04Q D 1
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_Recoil(-4)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 40, 0, 0, 12)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		
		W04Q E 1
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 30, 0, 0, 11)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 20, 0, 0, 10)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)

		W04Q G 1
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 10, 0, 0, 9)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", 0, 0, 0, 8)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -10, 0, 0, 7)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		W04Q H 1 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -20, 0, 0, 6)
		TNT1 A 0 A_SetAngle((-2)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwing", -30, 0, 0, 5)

		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		TNT1 A 0 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		W04Q I 2 A_WeaponReady //("Kicking",1,"KickLeft") 
		W04Q J 2 A_WeaponReady //("Kicking",1,"KickLeft") 
		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W04D G 2 A_WeaponReady
		W04D H 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)

	Goto Ready	
		



QuickLunge:
		TNT1 A 0 		
		TNT1 A 0 A_JumpIfInventory("Rage",150,"QuickPowerLunge")
	    TNT1 A 0 A_TakeInventory("InHold2",1)
		W04L ABCD 1 A_SetPitch((-1) + pitch) 
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_Recoil(-18)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)		//TO PREVENT LUNGE ABUSING
		
				
		TNT1 A 0 A_SetPitch((-2) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L EF 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L GH 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L IJ 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", -1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		//TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		

				
		W04L KL 1 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		
		W04L MN 3 A_WeaponReady //("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W04L O 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		TNT1 A 5 A_JumpIfInventory("Kicking",1,"KickLeft") 

		W04L PR 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		//TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)

	Goto Ready	
	
	Lunge:
		TNT1 A 0 A_JumpIfInventory("Rage",150,"PowerLunge")
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToLunge", 1)
		W04L RPON 1 A_SetPitch((-1) + pitch) 
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_Recoil(-18)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L ML 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L KJ 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L IG 1
		TNT1 A 0 A_FireCustomMissile("SwordLunge", -1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-1) + pitch)

		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
				
		W04L HF 1 //A_WeaponReady //("Kicking",1,"KickLeft")
		W04L E 3  A_WeaponReady //("Kicking",1,"KickLeft") 
		

		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "QuickLunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "SpecialAttack")
		W04L DC 3 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "SpecialAttack")

		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		
		W04D BCDEF 2 A_WeaponReady // ("Kicking",1,"KickRight")
		
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1) //TO PREVENT LUNGE ABUSING	
			
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")

	Goto Ready	


QuickPowerLunge:
		TNT1 A 0
	    TNT1 A 0 A_TakeInventory("InHold2",1)
		W04L ABCD 1 A_SetPitch((-1) + pitch) 
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_Recoil(-18)
		TNT1 A 0 A_ChangeVelocity(-sin(pitch)+15,0,cos(pitch)+2.5, CVF_RELATIVE)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_TakeInventory("ReadyToLunge", 1)		//TO PREVENT LUNGE ABUSING
		
				
		W04L E 1 A_ChangeVelocity(-sin(pitch)+4,0,-sin(pitch)+1, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L F 1 A_ChangeVelocity(-sin(pitch)+3,0,-sin(pitch)+1, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L G 1 A_ChangeVelocity(-sin(pitch)+2,0,-sin(pitch)+0.5, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L G 1 
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L H 1 A_ChangeVelocity(-sin(pitch)+1,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L H 1 A_ChangeVelocity(-sin(pitch)-3,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L I 1 A_ChangeVelocity(-sin(pitch)-4,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", -1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", -2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L I 1 A_ChangeVelocity(-sin(pitch)-4,0,-sin(pitch)+0.4, CVF_RELATIVE)	
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		
		W04L JJ 1 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
		W04L KK 1 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
				
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		
		W04L MN 2 A_WeaponReady //("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft") 
		
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W04L O 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		TNT1 A 5 A_JumpIfInventory("Kicking",1,"KickLeft") 

		W04L PR 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "Lunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "QuickFire")
		//TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)

	Goto Ready	
	
		

	PowerLunge:
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToLunge", 1)
		TNT1 A 0 A_Recoil(-18)
		TNT1 A 0 A_ChangeVelocity(-sin(pitch)+15,0,cos(pitch)+3, CVF_RELATIVE)
		W04L RPON 1 A_SetPitch((-1) + pitch) 
		TNT1 A 0 A_PlaySound("SWSWING")
		TNT1 A 0 A_SetPitch((-2) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L M 1 A_ChangeVelocity(-sin(pitch)+4,0,-sin(pitch)+1, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L L 1 A_ChangeVelocity(-sin(pitch)+3,0,-sin(pitch)+1, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-2) + pitch)
		W04L K 1 A_ChangeVelocity(-sin(pitch)+2,0,-sin(pitch)+0.5, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L K 1 
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L J 1 A_ChangeVelocity(-sin(pitch)+1,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L J 1 A_ChangeVelocity(-sin(pitch)-3,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", 1, 0, 0, -2)
		W04L H 1 A_ChangeVelocity(-sin(pitch)-4,0,-sin(pitch)+0.4, CVF_RELATIVE)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", -1, 0, 0, -2)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordPowerLunge", -2, 0, 0, -4)
		TNT1 A 0 A_SetPitch((-1) + pitch)
		W04L H 1 A_ChangeVelocity(-sin(pitch)-4,0,-sin(pitch)+0.4, CVF_RELATIVE)	
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
				
		W04L GG 1 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
		W04L FF 1 A_FireCustomMissile("SwordLunge", -2, 0, 0, -4)
		//A_WeaponReady //("Kicking",1,"KickLeft")
		W04L E 3  A_WeaponReady //("Kicking",1,"KickLeft") 
		

		TNT1 A 0 A_JumpIfInventory("FiredSecondary", 1, "QuickLunge")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "SpecialAttack")
		W04L DC 3 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")
		TNT1 A 0 A_JumpIfInventory("FiredPrimary", 1, "SpecialAttack")

		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		
		W04D BCDEF 2 A_WeaponReady // ("Kicking",1,"KickRight")
		
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1) //TO PREVENT LUNGE ABUSING	
	

		
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickRight")



	Goto Ready	
		
	RoundhouseSlash:
		TNT1 A 5
		TNT1 A 0 A_PlaySound("SWSWING")
		
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-18)
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		W04C A 2 A_SetAngle((-20)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 40, 0, 0, 7)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 38, 0, 0, 6)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C A 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 35, 0, 0, 6)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C B 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 30, 0, 0, 5)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 25, 0, 0, 5)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C B 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 20, 0, 0, 4)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 15, 0, 0, 4)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C C 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 10, 0, 0, 3)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 5, 0, 0, 3)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C C 1 A_SetPitch((-1.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", 0, 0, 0, 2)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -5, 0, 0, 1)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C D 1 A_SetPitch((-3) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -10, 0, 0, 0)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -15, 0, 0, -1)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C D 1 A_SetPitch((-3) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -20, 0, 0, -2)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -25, 0, 0, -2)
		TNT1 A 0 A_SetAngle((-20)+angle)
		W04C E 2 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -30, 0, 0, -4)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_SetPitch((0.5) + pitch)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -35, 0, 0, -4)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -40, 0, 0, -6)
		TNT1 A 0 A_SetAngle((-20)+angle)
		TNT1 A 0 A_FireCustomMissile("SwordSwingRound", -50, 0, 0, -6)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//TNT1 A 6 A_WeaponReady //("Kicking",1,"KickLeft")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		W04C F 3 A_WeaponReady //("Kicking",1,"KickLeft") 
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		//PUNG F 0 A_Custompunch(random(180,195),1,1,"BrutalAxePuff", 150)
		W04D G 4 A_WeaponReady
		W04D H 4 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		
		Goto Ready	
		
	/*AltFire:
	    TNT1 A 0
	    TNT1 A 0 A_JumpIfInventory("SpecialAttackSword", 1, "SpecialAttack")
		W04F ABC 2
	AltHold:
	    TNT1 A 0
		
	    W14C ABCD 1 BRIGHT A_FireCustomMissile("QuietusParticleSpawner",-50,0,0,5)
		W04C D 0 BRIGHT A_Refire
	

	    TNT1 A 0
		TNT1 A 0 A_PlaySound("SWSWING")
		W04S ABC 1 BRIGHT
		
		TNT1 A 0 A_JumpIfInventory("Level", 9, "UberAttack")
		TNT1 A 0 A_TakeInventory("Mana1", 12)
		TNT1 A 0 A_FireCustomMissile("QuietusRazors", 0, 1, 0, 0)
		W04S DEFG 1 BRIGHT
		TNT1 A 8
		W04D DE 1
		Goto Ready	
		
		UberAttack:
		TNT1 A 0 A_TakeInventory("Mana1", 12)
		TNT1 A 0 A_FireCustomMissile("SuperQuietusRazors", 0, 1, 0, 0)
		W04S DEFG 1 BRIGHT
		TNT1 A 8
		W04D DE 1
		Goto Ready	
	*/
	
	
/*	
	DoKick:

		TNT1 AA 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_Takeinventory("HasPlasmaWeapon",1)
		TNT1 A 0 A_TAkeinventory("HasCutingWeapon",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("PowerLightAmp",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		TNT1 A 0 A_JumpIfInventory("SpecialAttackPunch", 1, "KickRight")
		TNT1 A 0 A_JumpIfInventory("ReadyToQuickFire", 1, "KickLeft")
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		TNT1 A 0 A_JumpIfInventory("IsCrouching", 1, "SwordSlideAttack")
		
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		//TNT1 A 0 A_JumpIfInventory("RifleSelected", 1, "RifleBash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		K1CK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        K1CK H 5
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK I 1
		K1CK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIBA A 0 A_Takeinventory("Kicking",1)
		Goto Ready
	/*	TNT1 A 0
	    TNT1 A 0 A_JumpIfInventory("SpecialAttackPunch", 1, "KickRight")
		TNT1 A 0 A_JumpIfInventory("ReadyToQuickFire", 1, "KickLeft")
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		goto KickLeft
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		K1CK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        K1CK H 5
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK I 1
		K1CK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready */


SwordSlideAttack:
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		KICK A 0 A_Takeinventory("Kicking",1)
goto SlideAttack
		
		
	FinishSlide:	
		TNT1 A 0
		TNT1 A 0 A_PlaySound("SlideKickStop", 5)
		RIBA A 0 A_Takeinventory("Kicking",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		K1CK PQRST 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")

		Goto ready	
		
	FinishSlideHitwall:	
		TNT1 A 0

		TNT1 A 0 A_Stop
		RIBA A 0 A_Takeinventory("Kicking",1)
		TNT1 A 0 A_TAkeInventory("KickHasHit", 1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		K1CK PQRST 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")

		Goto ready		

	
	KickRight:
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		K1K2 ABC 1 A_SetPitch(-2 + pitch)
        TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Giveinventory("Punching",1)
		K1K2 D 1 A_SetPitch(2 + pitch)
		PUN2 A 0 A_Custompunch(35,0,1,"MeleePuff")
		K1K2 DD 1 A_TakeInventory("Kicking",1)
		K1K2 ECBA 2 A_WeaponReady
		TNT1 A 6 A_WeaponReady 
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		Goto Ready

KickLeft:
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		K1K1 ABC 1 A_SetPitch(-2 + pitch)
        TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Giveinventory("Punching",1)
		//TNT1 A 0 A_SetPitch(-2 + pitch)
		K1K1 D 1 A_SetPitch(2 + pitch)
		PUN2 A 0 A_Custompunch(35,0,1,"MeleePuff")
		K1K1 DD 1 A_TakeInventory("Kicking",1)
		K1K1 ECBA 2 A_WeaponReady 
		TNT1 A 6 A_WeaponReady  
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		Goto Ready

/*
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		K1CK BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        K1CK H 5
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK I 1
		K1CK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready

	
	KickRight:
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		K1K2 ABC 1 A_SetPitch(-2 + pitch)
        TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Giveinventory("Punching",1)
		K1K2 D 1 A_SetPitch(2 + pitch)
		PUN2 A 0 A_Custompunch(35,0,1,"MeleePuff")
		K1K2 DD 1 A_TakeInventory("Kicking",1)
		K1K2 ECBA 2 A_WeaponReady
		TNT1 A 6 A_WeaponReady 
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		Goto Ready
		
		
	KickLeft:
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		K1K1 ABC 1 A_SetPitch(-2 + pitch)
        TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Giveinventory("Punching",1)
		//TNT1 A 0 A_SetPitch(-2 + pitch)
		K1K1 D 1 A_SetPitch(2 + pitch)
		PUN2 A 0 A_Custompunch(35,0,1,"MeleePuff")
		K1K1 DD 1 A_TakeInventory("Kicking",1)
		K1K1 ECBA 2 A_WeaponReady 
		TNT1 A 6 A_WeaponReady  
		TNT1 A 0 A_TakeInventory("ReadyToSlashDown", 1)
		TNT1 A 0 A_TakeInventory("ReadyToQuickFire", 1)
		Goto Ready
	
	AirKick:
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		K1CK JKLMN 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        K1CK O 3
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK PQRST 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		Goto Ready
		
	SuperAirKick:
		TNT1 A 0 A_GiveInventory("SpecialAttackSword", 1)
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		K1CK JKLMN 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_TakeInventory("SpecialAttackSword", 1)
		Goto Ready
		
		DoExecution:
		TNT1 A 0 A_SetPitch(65)
		TNT1 A 1
		TNT1 A 0 A_ChangeFLag("NOPAIN", 1)
		TNT1 A 0 A_ChangeFLag("PUSHABLE", 0)
		TNT1 A 0 A_Stop
		TNT1 A 0 SetPlayerProperty(0,1,4)
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
		TNT1 A 0 A_JumpIfInventory("ExecuteBashWall", 1, "BashWall")
		TNT1 A 0 A_JumpIfInventory("ExecuteStompWall", 1, "StompWall")
		
		TNT1 AAAAA 1 A_SetPitch(70)
		TNT1 A 0 A_Jump(256, "Execution1", "Execution2", "Execution3")
		Goto Execution1
	
	Stompwall:
		TNT1 A 0 A_Stop
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
		TNT1 A 0 A_SetPitch(10)
		TNT1 A 0 A_Recoil(-1)

		K1CK JKLMN 1 A_Recoil(-1)
        RIFF A 0 A_FireCustomMissile("ExecutionAttackStompWall", 0, 0, 0, -7)
		
        K1CK OOO 2  A_Recoil(-1)
		K1CK A 0 A_Takeinventory("Kicking",1)
		K1CK PQRST 1
		
		K1CK A 0 A_Takeinventory("ExecuteStompWall",1)
		K1CK A 0 A_Takeinventory("ExecuteBashWall",1)
		TNT1 A 5
		Goto FinishExecution+8
		
			
	Bashwall:
		TNT1 A 0
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
		TNT1 A 0 A_PlaySound("imp/pain", 4)
		TNT1 A 0 A_ZoomFactor(1.3)
		IEHW A 2
		TNT1 A 0 A_ZoomFactor(1.0)
		IEHW A 8
		IEHW AAA 1 A_SetAngle(angle+6)
		IEHW BCDEF 1 A_SetAngle(angle+6)
		IEHW G 3
		TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
		TNT1 A 0 A_PlaySound("imp/pain", 4)
		TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
		
		IEHW HIJKKK 1 A_SetAngle(angle-3)
		IEHW KKKJIH 1 A_SetAngle(angle+3)
		IEHW FG 3
		TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
		TNT1 A 0 A_PlaySound("imp/pain", 4)
		TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
		
		IEHW HIJKKK 1 A_SetAngle(angle-3)
		IEHW KKKJIH 1 A_SetAngle(angle+3)
		IEHW FG 3
		TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
		TNT1 A 0 A_PlaySound("imp/pain", 4)
		TNT1 A 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
		
		IEHW HIJKKK 1 A_SetAngle(angle-3)
		IEHW KKKJIH 1 A_SetAngle(angle+3)
		TNT1 AA 0 A_CustomMissile("XDeath1", 48, 0, 45, 2)
		TNT1 A 0 A_CustomMissile("ImpHeadExplode", 48, 0, 45, 2)
		TNT1 A 0 A_CustomMissile("XDeath2", 48, 0, 45, 2)
		TNT1 AAA 0 A_CustomMissile("KickAttack", 48, 0, 45, 2)
		IEHW LMNO 1
		IEHW O 6
		IEHW PQRST 2 A_SetAngle(angle-4)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
		TNT1 AAA 1 A_SetAngle(angle-3)
		
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK A 0 A_Takeinventory("ExecuteBashWall",1)
		KICK A 0 A_Takeinventory("ExecuteStompWall",1)
		
		TNT1 A 5
		Goto FinishExecution+8	
		
	ExecuteAirStomp:
		TNT1 A 0
		TNT1 A 0 A_Stop
		TNT1 A 0 A_GiveInventory("IsExecutingOnAir", 1)
		TNT1 A 0 ThrustThingZ(0, 10, 0, 1)
		STOM ABCCCCC 1 A_SetPitch(80)
		STOM CCCCCCCCCCC 1 A_CheckFloor("DoAirStomp")
	DoAirStomp:
		RIFF AAA 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, 0)
        STOM D 5
		TNT1 A 0 ThrustThingZ(0, 20, 1, 1)
		TNT1 A 0 A_TakeInventory("IsExecutingOnAir", 1)
		KICK A 0 A_Takeinventory("ExecuteStompWall",1)
		KICK A 0 A_Takeinventory("ExecuteBashWall",1)
		Goto FinishExecution
		
	Execution1:	
		KICK BCD 1
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
		RIFF A 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, -7)
        KICK H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1
		TNT1 A 5
		Goto FinishExecution
		
	Execution2:
		TNT1 A 0
		TNT1 A 0 A_ZoomFactor(1.5)
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
		PUN4 B 1 A_Stop
        PUN4 C 1 A_PlaySound("skeleton/swing")
		PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		PUN4 E 3 A_Stop
		PUN4 DCB 2 A_Stop
		PUN3 A 1 A_Stop
        PUN3 B 1 A_PlaySound("skeleton/swing")
		PUN3 C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		PUN3 E 3 A_Stop
		PUN3 CBA 2 A_Stop
		
		PUN4 B 1 A_Stop
        PUN4 C 1 A_PlaySound("skeleton/swing")
		PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		PUN4 E 3 A_Stop
		PUN4 DCB 2 A_Stop
		PUN3 A 1 A_Stop
        PUN3 B 1 A_PlaySound("skeleton/swing")
		PUN3 C 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		PUN3 E 3 A_Stop
		PUN3 CBA 2 A_Stop
		
		PUN4 B 1 A_Stop
        PUN4 C 1 A_PlaySound("skeleton/swing")
		PUN4 D 1 A_FireCustomMissile("ExecutionAttackMelee", 0, 0, 0, 0)
		PUN4 E 3 A_Stop
		PUN4 DCB 2 A_Stop
		
		TNT1 A 1
		PUN3 A 1 A_Stop
        PUN3 B 1 A_PlaySound("skeleton/swing")
		PUN3 C 1 
		TNT1 AAA 0 A_FireCustomMissile("ExecutionAttackKick", 0, 0, 0, 0)
		PUN3 E 6 A_Stop
		PUN3 CBA 2 A_Stop
		TNT1 A 0 A_ZoomFactor(1.0)
		
		TNT1 A 5
		Goto FinishExecution
		
		
	Execution3:
		
		KIKF ABC 1
		//TTNT1 A 0 A_JumpIfInventory("IsFloating", 1, "ExecuteAirStomp")
        TNT1 A 0 A_PlaySound("KICK")
		KIKF D 1
		TNT1 AAA 0 A_FireCustomMissile("ExecutionAttackFatality", 0, 0, 0, 0)
		KIKF DDDDDDD 1 A_SetPitch(Pitch-10)
		KIKF ECBA 2
		TNT1 A 0 SetPlayerProperty(0,0,4)
		TNT1 A 0 A_ChangeFLag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFLag("PUSHABLE", 1)
		TNT1 A 5 
		KICK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
		Goto ready
		
	FinishExecution:
		TNT1 A 0
		TNT1 AAAAAAAA 1 A_SetPitch(Pitch-10)
		TNT1 A 0 A_ChangeFLag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFLag("PUSHABLE", 1)
		TNT1 A 0 SetPlayerProperty(0,0,4)
		KICK A 0 A_Takeinventory("ExecuteDownedEnemy",1)
		Goto ready
		*/
	
		
    Taunt:
        TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		//TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		//TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		//TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
		//BLIN A 1 A_FireCustomMissile("ParaPsiStrike", 0, 1, 8)
		//BLIN A 1 A_FireBullets(0, 0, 1, 9, "ParaPsiStrikeBullet", 256) 		

TNT1 A 0 A_Blast
TNT1 A 0 A_FireBullets(0,0,1,40,"shotpuff",FBF_NORANDOM,64)
TNT1 A 0 A_TakeInventory("zeal",10)
		BLIN A 1 A_FireCustomMissile("ParaPsiStrike", 0, 0, 0, 9)
        //BLIN ABC 2 A_FireCustomMissile("ShieldAttack", 0, 0, 0, -7)
		TNT1 A 0 A_PlaySound("PARAPSI")
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_GiveInventory("ReadyToQuickFire", 1)
		TNT1 A 0 A_GiveInventory("ReadyToSlashDown", 1)
		BLIN DEF 1 A_WeaponReady
		BLIN DFE 1 A_WeaponReady 
		BLIN CBA 1 A_WeaponReady 
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		WDBR ABCD 1 
		WDBR EF 2 A_SpawnItemEx("ShieldDefense", 25,5,15,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_JumpIfInventory("zeal",10,"CastDefense")
		WDBR FFF 2 A_SpawnItemEx("ShieldDefense", 25,5,15,0,0,0,0,SXF_NOCHECKPOSITION,0)
		goto SaluteEnd
		CastDefense:
		TNT1 A 0 A_TakeInventory("zeal",10)
		TNT1 A 0 A_GiveInventory("BracerPowerGiver", 1)
		WDBR GHI 2 BRIGHT A_SpawnItemEx("ShieldDefense", 25,5,15,0,0,0,0,SXF_NOCHECKPOSITION,0)
		
		SaluteEnd:		
		WDBR JKL 2 A_SpawnItemEx("ShieldDefense", 25,5,15,0,0,0,0,SXF_NOCHECKPOSITION,0)
		WDBR MNO 1
		SBLL A 0 A_PlaySound("PortalHit")
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready

	Steady:
	TNT1 A 1
	TNT1 A 0 ACS_Execute(477, 0, 0, 0, 0)
	Goto Ready

	}
}


Actor QuietusParticleSpawner
{
    Speed 20
    +NOCLIP
    States
    {
    Spawn:
		TNT1 A 0
		NULL A 0 A_CustomMissile ("BFGExtraParticle", 0, 0, random (0, 360), 2, random (0, 180))
		Stop
    }
}



Actor InHold2 : Inventory
{
inventory.maxamount 1
}

Actor SpecialAttackSword : Inventory
{
inventory.maxamount 1
}

Actor ReadyToQuickFire : Inventory
{
inventory.maxamount 1
}

Actor ReadyToSlashDown : Inventory
{
inventory.maxamount 1
}


Actor ReadyToSlashDown2 : Inventory
{
inventory.maxamount 1
}

Actor ReadyToLunge : Inventory
{
inventory.maxamount 1
}

ACTOR QuietusRazors: FastProjectile
{
	Radius 36
	Height 1
	Speed 30
	Damage 95
	Projectile
	+MISSILE
	
	+RIPPER
	+EXTREMEDEATH
	+NOGRAVITY
	+NOCLIP
renderstyle ADD
alpha 0.90
Scale 1.0
	DeathSound "FighterSwordExplode"
	States
	{
	Spawn:
	    BFE1 FEF 1 BRIGHT A_SpawnItem("GreenFlare")
		TNT1 A 0 A_CustomMissile ("BFGTrailParticle", 3, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_ChangeFlag("NOCLIP", 0)
		Goto Fly
	Fly:	
        BFE1 EF 1 BRIGHT A_SpawnItem("GreenFlare")
		TNT1 A 0 A_CustomMissile ("BFGTrailParticle", 3, 0, random (0, 360), 2, random (0, 360))
		Loop

	Death:
	BFE1 EDCBA 3 BRIGHT A_SpawnItem("GreenFlare")
	Stop
	}
}


ACTOR SuperQuietusRazors: QuietusRazors
{
	Radius 38
	Speed 40
Scale 1.3
}

ACTOR SwordSwing
{
	Radius 6
	Height 6
	DamageType Cut
	Projectile 
	+FORCEXYBILLBOARD
//	+NOEXTREMEDEATH
	+BLOODSPLATTER
	+FORCEPAIN
	Damage 9
	Speed 40
	Obituary "%o was sliced-n-diced by %k"
//	SeeSound "none"
//	DeathSound "none"
	Decal "none"
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 BRIGHT
		Stop
	XDeath:
		TNT1 A 0 A_PlaySound("SLMETA", 1)
		TNT1 A 0 A_GiveToTarget("Rage",2)
		TNT1 A 1
		Stop
	Death:
		TNT1 A 0 A_SpawnItemEx("SwordPuff",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 1 Radius_Quake(2, 3, 0, 4, 0)
		TNT1 A 1
		Stop
	Crash:
		TNT1 A 1 A_PlaySound("SLMETA", 1)
		TNT1 A 0 A_SpawnItemEx("SwordPuff",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 1
		Stop
		}
}

ACTOR SwordLunge: SwordSwing
{	DamageType Shotgun
	Speed 60
	Damage 9
	}

ACTOR SwordPowerLunge: SwordSwing
{	DamageType Shotgun
	Damage (random(50,75))
	Speed 90
	Mass 200
	}


ACTOR SwordSlash: SwordSwing
{
	DamageType Saw
	Damage 10
}


ACTOR SwordSwing2 : SwordSwing
{ DamageType cut}

ACTOR SwordSwingRound : SwordSwing
{ DamageType cut
Damage 11}


ACTOR ParaPsiStrike
{
+NOBLOCKMAP
+FORCEPAIN
+FORCERADIUSDMG
+THRUACTORS
+RIPPER
Damage 1
//+MISSILE
projectile 
radius 16
height 16
Scale 1.0
Damagetype Kick
speed 120

	
	States
	{
   Spawn:
   TNT1 AAAAAAA 1 A_SpawnItem("ParaPsiExplosion")
   Goto spawn
   Crush:
   XDeath:
   Death:
   //TNT1 A 0 A_Explode(10,120)
 // SHOK CEGIKMOQS 1 BRIGHT A_FadeOut(0.11)
 
   TNT1 A 2 A_SpawnItem("ParaPsiExplosion")
 // TNT1 A 0 A_BFGSpray("SuperBFGExtra", 20, 1)
   Stop    
    }
}

ACTOR ParaPsiStrikeBullet
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOEXTREMEDEATH
  +PUFFONACTORS
  +BLOODLESSIMPACT 
  +FORCEXYBILLBOARD
  +DONTSPLASH
  +FORCEPAIN
Species "Marines"
+THRUSPECIES
+MTHRUSPECIES
+DONTHURTSPECIES
Damagetype Kick
Decal "Crack"
	states 
	{
  Spawn:
  Crush:
  		TNT1 A 0 A_Explode(1,128)
		SHOK CEGIKMOQS 1 BRIGHT A_FadeOut(0.11)
  Death:
  Melee:
  XDeath:
		TNT1 A 0 A_Explode(1,128)
		SHOK CEGIKMOQS 1 BRIGHT A_FadeOut(0.11)
	stop
	}
}

ACTOR ParaPsiExplosion

{
+MISSILE
+FORCEPAIN
radius 4
height 8
Damagetype Kick
Species "Marines"
Renderstyle Add
Scale 1.0
Alpha 0.20
+THRUSPECIES
+MTHRUSPECIES
+DONTHURTSPECIES

    States    
    {
  DM:
        TNT1 A 0
        TNT1 A 0 A_ChangeFLag("THRUSPECIES", 0)
        TNT1 A 0 A_ChangeFLag("MTHRUSPECIES", 0)
        Goto Spawn
	Spawn:
		TNT1 A 0
		//	RAIL A 0 A_SpawnItem("WhiteShockwave")
	Death:

		TNT1 A 0 A_Explode(2,128,0)
		SHWK CEGIKMOQ 1 A_FadeOut(0.02)	
		stop
	}
}